import Login from './login/login'
import Bms from './bms/bms'
import { BrowserRouter } from 'react-router-dom'
import { Navigate, Route, Routes } from 'react-router'
import React from 'react'
import BookInfo from './bms/components/content/BookInfo'
import BorrowingRecord from './bms/components/content/BorrowingRecord'
import MyBookFriends from './bms/components/content/MyBookFriends'
import UserInfo from './bms/components/userInfo/UserInfo'

class App extends React.PureComponent {
  render () {
    return (
      <React.Fragment>
        <BrowserRouter>
          <Routes>
            <Route exact path="" element={<Login/>}/>
            <Route exact path="/bms" element={<Bms/>}>
              <Route exact path="bookInfo" element={<BookInfo/>}/>
              <Route exact path="borrowingRecord" element={<BorrowingRecord/>}/>
              <Route exact path="myBookFriends" element={<MyBookFriends/>}/>
              <Route exact path="userInfo" element={<UserInfo/>}/>
            </Route>
            <Route exact path="*" element={<Navigate to=""/>}/>
          </Routes>
        </BrowserRouter>
      </React.Fragment>
    )
  }
}

export default App
